Optimal. Leaf size=149 \[ \frac{\sqrt{d (c d-b e)-b e^2 x-c e^2 x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2 e^2}+\frac{(2 c d-b e) (-3 b e g+2 c d g+4 c e f) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.156949, antiderivative size = 149, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 42, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {779, 621, 204} \[ \frac{\sqrt{d (c d-b e)-b e^2 x-c e^2 x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2 e^2}+\frac{(2 c d-b e) (-3 b e g+2 c d g+4 c e f) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 779
Rule 621
Rule 204
Rubi steps
\begin{align*} \int \frac{(d+e x) (f+g x)}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx &=\frac{(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac{((2 c d-b e) (4 c e f+2 c d g-3 b e g)) \int \frac{1}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{8 c^2 e}\\ &=\frac{(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac{((2 c d-b e) (4 c e f+2 c d g-3 b e g)) \operatorname{Subst}\left (\int \frac{1}{-4 c e^2-x^2} \, dx,x,\frac{-b e^2-2 c e^2 x}{\sqrt{c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{4 c^2 e}\\ &=\frac{(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac{(2 c d-b e) (4 c e f+2 c d g-3 b e g) \tan ^{-1}\left (\frac{e (b+2 c x)}{2 \sqrt{c} \sqrt{d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2}\\ \end{align*}
Mathematica [A] time = 0.848448, size = 218, normalized size = 1.46 \[ \frac{\sqrt{c} \sqrt{e} (d+e x) \sqrt{e (2 c d-b e)} (b e-c d+c e x) (2 c (2 d g+2 e f+e g x)-3 b e g)+e \sqrt{d+e x} (b e-2 c d)^2 \sqrt{\frac{b e-c d+c e x}{b e-2 c d}} (-3 b e g+2 c d g+4 c e f) \sin ^{-1}\left (\frac{\sqrt{c} \sqrt{e} \sqrt{d+e x}}{\sqrt{e (2 c d-b e)}}\right )}{4 c^{5/2} e^{5/2} \sqrt{e (2 c d-b e)} \sqrt{(d+e x) (c (d-e x)-b e)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.008, size = 460, normalized size = 3.1 \begin{align*} -{\frac{gx}{2\,ce}\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}+{\frac{3\,gb}{4\,e{c}^{2}}\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}+{\frac{3\,{b}^{2}eg}{8\,{c}^{2}}\arctan \left ({\sqrt{c{e}^{2}} \left ( x+{\frac{b}{2\,c}} \right ){\frac{1}{\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}}} \right ){\frac{1}{\sqrt{c{e}^{2}}}}}-{\frac{gbd}{c}\arctan \left ({\sqrt{c{e}^{2}} \left ( x+{\frac{b}{2\,c}} \right ){\frac{1}{\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}}} \right ){\frac{1}{\sqrt{c{e}^{2}}}}}+{\frac{{d}^{2}g}{2\,e}\arctan \left ({\sqrt{c{e}^{2}} \left ( x+{\frac{b}{2\,c}} \right ){\frac{1}{\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}}} \right ){\frac{1}{\sqrt{c{e}^{2}}}}}-{\frac{dg}{c{e}^{2}}\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}-{\frac{f}{ce}\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}-{\frac{bef}{2\,c}\arctan \left ({\sqrt{c{e}^{2}} \left ( x+{\frac{b}{2\,c}} \right ){\frac{1}{\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}}} \right ){\frac{1}{\sqrt{c{e}^{2}}}}}+{df\arctan \left ({\sqrt{c{e}^{2}} \left ( x+{\frac{b}{2\,c}} \right ){\frac{1}{\sqrt{-c{e}^{2}{x}^{2}-b{e}^{2}x-bde+c{d}^{2}}}}} \right ){\frac{1}{\sqrt{c{e}^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.54116, size = 880, normalized size = 5.91 \begin{align*} \left [-\frac{{\left (4 \,{\left (2 \, c^{2} d e - b c e^{2}\right )} f +{\left (4 \, c^{2} d^{2} - 8 \, b c d e + 3 \, b^{2} e^{2}\right )} g\right )} \sqrt{-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} - 4 \, \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}{\left (2 \, c e x + b e\right )} \sqrt{-c}\right ) + 4 \,{\left (2 \, c^{2} e g x + 4 \, c^{2} e f +{\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{16 \, c^{3} e^{2}}, -\frac{{\left (4 \,{\left (2 \, c^{2} d e - b c e^{2}\right )} f +{\left (4 \, c^{2} d^{2} - 8 \, b c d e + 3 \, b^{2} e^{2}\right )} g\right )} \sqrt{c} \arctan \left (\frac{\sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}{\left (2 \, c e x + b e\right )} \sqrt{c}}{2 \,{\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) + 2 \,{\left (2 \, c^{2} e g x + 4 \, c^{2} e f +{\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt{-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{8 \, c^{3} e^{2}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (d + e x\right ) \left (f + g x\right )}{\sqrt{- \left (d + e x\right ) \left (b e - c d + c e x\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28223, size = 242, normalized size = 1.62 \begin{align*} -\frac{1}{4} \, \sqrt{-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}{\left (\frac{2 \, g x e^{\left (-1\right )}}{c} + \frac{{\left (4 \, c d g e + 4 \, c f e^{2} - 3 \, b g e^{2}\right )} e^{\left (-3\right )}}{c^{2}}\right )} + \frac{{\left (4 \, c^{2} d^{2} g + 8 \, c^{2} d f e - 8 \, b c d g e - 4 \, b c f e^{2} + 3 \, b^{2} g e^{2}\right )} \sqrt{-c e^{2}} e^{\left (-3\right )} \log \left ({\left | -2 \,{\left (\sqrt{-c e^{2}} x - \sqrt{-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}\right )} c - \sqrt{-c e^{2}} b \right |}\right )}{8 \, c^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]